package com.jk.controller;


import com.jk.entity.ComboEntity;
import com.jk.service.ComboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("combo")
@CrossOrigin(origins = "*")
public class ComboController {


    @Autowired
    private ComboService comboService;
    //套餐管理/套餐列表/查询
    @RequestMapping("getlist")
    public List<ComboEntity>getlist(ComboEntity com){
        return comboService.getlist(com);
    }
    //套餐管理/套餐列表/删除
    @RequestMapping("delete")
    public void delete(Integer id){
        comboService.delete(id);
    }
    //套餐管理/套餐列表/新增1
    @RequestMapping("add")
    public void add(ComboEntity com){
         comboService.add(com);
    }
    //套餐管理/套餐列表/修改
    @RequestMapping("update")
    public void update(ComboEntity com){
        comboService.update(com);
    }


}
